SetFontSize
Sets the font size to the characters of the current text Range.
Syntax
expression.SetFontSize(FontSize);
expression
- A variable that represents a ApiRange class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
FontSize | Required | hps | The text size value measured in half-points (1/144 of an inch). |
Returns
ApiRange | null
Example
This example sets the font size to the characters of the text Range.
let doc = Api.GetDocument();
let paragraph = doc.GetElement(0);
paragraph.AddText("ONLYOFFICE Document Builder");
let range = doc.GetRange(0, 24);
range.SetFontSize(14);